import request from './request'
let user='/user'
let house='/house'
let oder='/order'
let admin='/admin'
let menu='/menu'
export const userSearch = (currentPage,displayCount,data)=>request({
    url:`${user}/search`,
    method:'POST',
    data:{
        ...data,
        currentPage,
        displayCount,
    }
})
export const userDelete = (userid)=>request({
    url:`${user}/del`+'?userid='+userid
})
export const userAdd = (data)=>request({
    url:`${user}/add`,
    method:'POST',
    data:{
        ...data
    }
})
export const userUpdate = (data)=>request({
    url:`${user}/update`,
    method:'POST',
    data:{
        ...data
    }
})
export const houseSearch = (data)=>request({
    url:`${house}/list`,
    method:'POST',
    data:{
        ...data,
    }
})
export const houseAdd = (data)=>request({
    url:`${house}/add`,
    method:'POST',
    data:{
        ...data,
    }
})
export const houseUpdate = (data)=>request({
    url:`${house}/update`,
    method:'POST',
    data:{
        ...data,
    }
})
export const houseDelete = (data)=>request({
    url:`${house}/del`,
    method:'POST',
    data:{
        ...data,
    }
})
export const oderSearch = (data)=>request({
    url:`${oder}/search`,
    method:'POST',
    data:{
        ...data,
    }
})
export const oderAdd = (data)=>request({
    url:`${oder}/add`,
    method:'POST',
    data:{
        ...data,
    }
})
export const oderUpdate = (data)=>request({
    url:`${oder}/update`,
    method:'POST',
    data:{
        ...data,
    }
})
export const oderUpdateAll = (data)=>request({
    url:`${oder}/updateAll`,
    method:'POST',
    data:data,
})
export const adminSearch = (data)=>request({
    url:`${admin}/search`,
    method:'POST',
    data: {...data},
})
export const adminAdd = (data)=>request({
    url:`${admin}/insert`,
    method:'POST',
    data: {...data},
})
export const adminUpdate = (data)=>request({
    url:`${admin}/update`,
    method:'POST',
    data: {...data},
})
export const menuSearch = (data)=>request({
    url:`${menu}/search`,
    method:'POST',
    data: {...data},
})
export const menuAdd = (data)=>request({
    url:`${menu}/add`,
    method:'POST',
    data: {...data},
})
export const menuUpdate = (data)=>request({
    url:`${menu}/update`,
    method:'POST',
    data: {...data},
})